﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SystemAnalizer.Common
{
    public class MathHelper
    {
        public static double factorial(int n)
        {
            if (n == 0 || n == 1)
                return 1;
            return n * factorial(n - 1);
        }

        public static double binom(int m,int l)
        {
            if (l > m)
                return 0;
            return factorial(m) / (factorial(m - 1) * factorial(l));
        }
    }
}
